package com.zhongxi.guoyuan.OffLineShop.Model;

import org.json.JSONObject;

import java.io.Serializable;

/**
 * Created by Administrator on 2018/1/8.
 */

public class ItemShopInfo implements Serializable {
    private String id;
    private String name;
    private String cateid;  // 分类id
    private String phone;
    private String mphone;
    private String thumbnail;
    private String starlevel;
    private String workertime;
    private int presenttype;
    private int ordernum;
    private String discount; // 折扣率
    private String address;
    private String distance;
    private String cateName;
    private String backinnerrate;
    private String latitude;
    private String longitude;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getMphone() {
        return mphone;
    }

    public void setMphone(String mphone) {
        this.mphone = mphone;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail;
    }

    public String getStarlevel() {
        return starlevel;
    }

    public void setStarlevel(String starlevel) {
        this.starlevel = starlevel;
    }

    public String getWorkertime() {
        return workertime;
    }

    public void setWorkertime(String workertime) {
        this.workertime = workertime;
    }

    public int getPresenttype() {
        return presenttype;
    }

    public void setPresenttype(int presenttype) {
        this.presenttype = presenttype;
    }

    public int getOrdernum() {
        return ordernum;
    }

    public void setOrdernum(int ordernum) {
        this.ordernum = ordernum;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDistance() {
        return distance;
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public String getCateid() {
        return cateid;
    }

    public void setCateid(String cateid) {
        this.cateid = cateid;
    }

    public String getDiscount() {
        return discount;
    }

    public void setDiscount(String discount) {
        this.discount = discount;
    }

    public String getCateName() {
        return cateName;
    }

    public void setCateName(String cateName) {
        this.cateName = cateName;
    }

    public String getBackinnerrate() {
        return backinnerrate;
    }

    public void setBackinnerrate(String backinnerrate) {
        this.backinnerrate = backinnerrate;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public static ItemShopInfo getParseObject(JSONObject jsonObject) {
        ItemShopInfo mShopInfo = new ItemShopInfo();
        mShopInfo.setId(jsonObject.optString("id"));
        mShopInfo.setName(jsonObject.optString("name"));
        mShopInfo.setAddress(jsonObject.optString("address"));
        mShopInfo.setCateid(jsonObject.optString("cateid"));
        mShopInfo.setPhone(jsonObject.optString("phone"));
        mShopInfo.setMphone(jsonObject.optString("mphone"));  // 手机号
        mShopInfo.setThumbnail(jsonObject.optString("thumbnail"));
        mShopInfo.setStarlevel(jsonObject.optString("starlevel"));
        mShopInfo.setWorkertime(jsonObject.optString("workertime"));
        mShopInfo.setOrdernum(jsonObject.optInt("ordernum"));  // 下单次数
        mShopInfo.setDiscount(jsonObject.optString("discount"));
        mShopInfo.setDistance(jsonObject.optString("distance"));
        mShopInfo.setBackinnerrate(jsonObject.optString("backinnerrate"));  //返美豆比 分子
        mShopInfo.setLatitude(jsonObject.optString("latitude"));
        mShopInfo.setLongitude(jsonObject.optString("longitude"));
        return mShopInfo;
    }

}
